#ifndef CURVAHERMIT_H
#define CURVAHERMIT_H

#include "curva.h"

class CurvaHermit : public Curva
{
	protected:
		QVector<QPointF> _normals;

		QVector<QPointF> _bezierPoints;

		void makeBezierPoints (void);

		void plotSubCurve(QGraphicsScene &s, QPen& p, int index);

		void plotCurve(QGraphicsScene &s, QPen& p);
		void plotControls(QGraphicsScene &s, QPen& p);
		void plotSteps(QGraphicsScene &s, QPen& p);
		void plotFecho(QGraphicsScene &s, QPen& p);

	public:
		//CurvaHermit (QGraphicsScene& s);
		CurvaHermit (void);
		~CurvaHermit();

		void read(QDomElement node);
		QDomElement save(QDomDocument doc);

		void addPoint (QPointF p);
		int removePoint (QPointF* p);

		void clear (QGraphicsScene &s);
		void plot(QGraphicsScene &s, QPen& p, RenderMode renderMode);
		bool validate (void);
		bool minimumValidate (void);

		QImage draw();

		QPointF* selectPoint (QPointF& p, const double precision);
};

#endif // CURVAHERMIT_H
